<h3>
   更新用户
</h3>
<div ng-controller="updateUserController" class="container-fluid">
   <div class="col-md-12">
      <form name="formValidate" ng-submit="update()"  ng-init="initData()" novalidate="" class="form-validate form-horizontal">
         <!-- START panel-->
         <div class="panel panel-default">
            <div class="panel-body">
               <fieldset>
                  <div class="form-group">
                     <label class="col-sm-2 control-label">姓名</label>
                     <div class="col-sm-6">
                        <span class="form-control">{{user.name}}</span>
                     </div>
                  </div>
               </fieldset>
               <fieldset>
                  <div class="form-group">
                     <label for="input-email" class="col-sm-2 control-label">email</label>
                     <div class="col-sm-6">
                        <input id="input-email" name="user.email"  ng-model="user.email" type="email" placeholder="请填写email" class="form-control" />
                        <span ng-show="validateInput('user.email', 'required')" class="text-danger">必填字段</span>
                        <span ng-show="validateInput('user.email', 'email')" class="text-danger">必填emial格式</span>
                     </div>
                  </div>
               </fieldset>
               <fieldset>
                  <div class="form-group">
                     <label for="input-age" class="col-sm-2 control-label">年龄</label>
                     <div class="col-sm-6">
                        <input id="input-age" name="user.age" ng-model="user.age" required="" ng-pattern="/^[0-9]+$/" type="text" placeholder="请填写年龄" class="form-control" />
                        <span ng-show="validateInput('user.age', 'pattern')" class="text-danger">必须是数字</span>
                     </div>
                  </div>
               </fieldset>
               <fieldset>
                  <div class="form-group">
                     <label for="input-gender" class="col-sm-2 control-label">性别</label>
                     <div class="col-sm-6">
                        <select id="input-gender" name="user.gender"  ng-model="user.gender" ng-options="x.key as x.value for x in genderCollection"  class="form-control">
                        </select>
                     </div>
                  </div>
               </fieldset>
               <fieldset>
                  <div ng-controller="datepickerCtrl" class="form-group">
                     <label for="input-birthday" class="col-sm-2 control-label">出生日期</label>
                     <div class="col-sm-6">
                        <p class="input-group">
                           <input id="input-birthday" type="text" name="user.birthday" datepicker-popup="{{format}}" ng-model="user.birthday" is-open="opened" max-date="'2016-07-22'" datepicker-options="dateOptions"  close-text="Close"
                                  class="form-control" />
                              <span class="input-group-btn">
                                 <button type="button" ng-click="open($event)" class="btn btn-default">
                                    <em class="fa fa-calendar"></em>
                                 </button>
                              </span>
                        </p>
                     </div>
                  </div>
               </fieldset>
            </div>
            <div class="panel-footer text-center">
               <button type="submit" class="btn btn-info">提交</button>
            </div>
         </div>
      </form>
   </div>
</div>